@tailwind base;
@tailwind components;
@tailwind utilities;

* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-fill-4) var(--color-bg-7);
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  background-color: var(--color-bg-7);
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: var(--color-fill-4);
  opacity: 0;
  transition: opacity 0.3s;
}

*::-webkit-scrollbar-thumb:hover {
  opacity: 1;
  background: var(--color-fill-4);
  box-shadow: inset 0 0 6px var(--color-fill-4);
}

:root {
  --color-primary: #155AEF;
  --color-primary-bg-active: #e1edfc;
  --color-secondary: #F2F4F7;
  --color-text-1: #1E252E;
  --color-text-2: #475468;
  --color-text-3: #7588A3;
  --color-text-4: #B2BDCC;
  --color-text-active: #155AEF;
  --color-text-hover: #1018280A;
  --color-bg: #FFFFFF;
  --color-bg-hover: #f2f4f7;
  --color-bg-active: #155aef14;
  --color-border: #eaecf0;
  --color-border-1: #EDEFF3;
  --color-border-2: #E6E9EE;
  --color-border-3: #D1D7E1;
  --color-border-4: #B2BDCC;
  --color-fill-1: #F6F8F9;
  --color-fill-2: #F4F5F8;
  --color-fill-3: #EDEFF3;
  --color-fill-4: #E6E9EE;
  --color-fill-5: #D1D7E1;
  --color-bg-1: #FFFFFF;
  --color-bg-2: #FFFFFF;
  --color-bg-3: #FFFFFF;
  --color-bg-4: #F4F5F8;
  --color-bg-5: #F4F5F8;
  --color-bg-6: rgba(255,255,255, 0.16);
  --color-bg-7: rgba(255,255,255, 0.12);
  --color-success: #27C274;
  --color-fail: #F43B2C;

  --color-background-body: var(--color-secondary);
  --color-components-nav-button-text: var(--color-text-2);
  --color-components-nav-button-text-active: var(--color-primary);
  --color-components-nav-button-bg: var(--color-bg);
  --color-components-nav-button-bg-active: #FCFCFD;
  --color-components-nav-button-bg-hover: var(--color-text-hover);
  --color-components-nav-border: var(--color-border);

  --color-components-side-nav-text: var(--color-text-2);
  --color-components-side-nav-text-active: var(--color-primary);
  --color-components-side-nav-text-active-bg: var(--color-bg-active);
  --color-components-side-nav-hover-bg: var(--color-bg-hover);
  --color-components-side-nav-bg: var(--color-bg);

  --color-primary-bg: var(--color-bg);
  --color-modal-header-color: #f5f8ff;
  --color-bg-image-gradient-1: #e3e8ff;
  --color-bg-image-gradient-2: #f9fafb;

  --ant-dropdown-padding-block: 5px;
  --ant-popover-inner-padding: 12px;
}

.dark {
  --color-primary: #155AEF;
  --color-primary-bg-active: #172637;
  --color-secondary: #1d1d20;
  --color-text-1: rgba(255,255,255, 0.9);
  --color-text-2: rgba(255,255,255, 0.7);
  --color-text-3: rgba(255,255,255, 0.5);
  --color-text-4: rgba(255,255,255, 0.3);
  --color-text-active: #f4f4f5;
  --color-text-hover: #c8ceda0a;
  --color-bg: #141414;
  --color-bg-hover: #c8ceda24;
  --color-bg-active: #155aef14;
  --color-border: #333333;
  --color-border-1: rgba(255,255,255, 0.1);
  --color-border-2: rgba(255,255,255, 0.2);
  --color-border-3: rgba(255,255,255, 0.4);
  --color-border-4: #B2BDCC;
  --color-fill-1: rgba(255,255,255, 0.04);
  --color-fill-2: rgba(255,255,255, 0.08);
  --color-fill-3: rgba(255,255,255, 0.12);
  --color-fill-4: rgba(255,255,255, 0.16);
  --color-fill-5: rgba(255,255,255, 0.2);
  --color-bg-1: #071d2c;
  --color-bg-2: #0C2536;
  --color-bg-3: #162d3e;
  --color-bg-4: #203A4E;
  --color-bg-5: #3D576A;
  --color-bg-6: rgba(255,255,255, 0.16);
  --color-bg-7: rgba(255,255,255, 0.12);

  --color-background-body: var(--color-secondary);
  --color-components-nav-button-text: var(--color-text-2);
  --color-components-nav-button-text-active: var(--color-text-active);
  --color-components-nav-button-bg: var(--color-bg);
  --color-components-nav-button-bg-active: var(--color-bg-hover);
  --color-components-nav-button-border: var(--color-border);
  --color-components-nav-button-bg-hover: var(--color-text-hover);
  --color-components-nav-border: var(--color-border);

  --color-components-side-nav-text: var(--color-text-2);
  --color-components-side-nav-text-active: var(--color-primary);
  --color-components-side-nav-text-active-bg: var(--color-bg-active);
  --color-components-side-nav-hover-bg: var(--color-bg-hover);
  --color-components-side-nav-bg: var(--color-bg);

  --color-primary-bg: var(--color-secondary);
  --color-modal-header-color: var(--color-bg-2);
  --color-bg-image-gradient-1: #2e313a;
  --color-bg-image-gradient-2: #161719;
}

body {
  color: var(--color-components-nav-button-text);
  background: var(--color-background-body);
  min-width: 1280px;
}

html:not(.dark) body {
  color: var(--color-components-nav-button-text);
  background: var(--color-background-body);
  background-image: url('/system-bg.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

@layer utilities {
  .text-balance {
    text-wrap: balance;
  }
}

.left-section {
  @apply flex items-center space-x-4;
}

.right-section {
  @apply flex items-center space-x-4;
}

.icon {
  width: 1em; height: 1em;
  vertical-align: -0.15em;
  fill: currentColor !important;
  overflow: hidden;
}

.header-bg {
  background: inherit;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.first-loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  background-color: #ffffff;
}
.loading-arc {
  position: absolute;
  margin: auto;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border-top: 2px solid #ffea29;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  animation: rt 2s infinite linear;
}
.loading-arc::before {
  position: absolute;
  margin: auto;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border-top: 2px solid #8d29ff;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  animation: rt 4s infinite linear reverse;
  content: "";
}
.loading-arc::after {
  position: absolute;
  margin: auto;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-radius: 50%;
  border-top: initial;
  border-left: initial;
  border-right: initial;
  animation: cw 1s infinite;
  content: "";
  background: #0b0b14;
}

.first-loader-wrapper h1 {
  position: absolute;
  height: 40px;
  margin: auto;
  top: 200px;
  left: 0;
  right: 0;
  bottom: 0;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.1em;
  font-size: 14px;
  font-weight: lighter;
  color: #000000;
}
.first-loader-wrapper h1 span {
  display: none;
}
.first-loader-wrapper h1::after {
  animation: txt 5s infinite;
  content: "";
}

.border {
  border: 1px solid var(--color-border) !important;
}

.ant-dropdown {
  z-index: 10000;
}

.font-mini {
  font-size: 10px;
}

.user-groups-submenu {
  max-height: 300px !important;
  overflow-y: auto !important;
}

.user-groups-submenu .ant-dropdown-menu {
  max-height: 300px !important;
  overflow-y: auto !important;
}

@keyframes rt {
  100% {
      transform: rotate(360deg);
  }
}
@keyframes cw {
  0% {
      width: 0;
      height: 0;
  }
  75% {
      width: 40px;
      height: 40px;
  }
  100% {
      width: 0;
      height: 0;
  }
}
@keyframes txt {
  0% {
      content: "LOADING.";
  }
  50% {
      content: "LOADING..";
  }
  100% {
      content: "LOADING...";
  }
}
